/*
 * <p>Title: :MetadataChild.java </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2009</p>
 * <p>Company: Digitalchina Co.Ltd</p>
 * @author lijun
 * @version 1.0
 * 修改历史： 
 * <作者> <时间(yyyy/mm/dd)>  <修改内容>  <版本号>
 */
package com.dc.trans.steps.bwzh.metadata.impls;

import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Properties;

import com.dc.trans.steps.bwzh.metadata.interfaces.IMetadataChild;
import com.dc.trans.steps.bwzh.metadata.interfaces.IMetadataContainer;

public class MetadataChild implements IMetadataChild {

	private Properties pro = new Properties();

	private IMetadataContainer parent;

	public IMetadataContainer getParent() {

		return this.parent;
	}

	public void setParent(IMetadataContainer parent) {
		this.parent = parent;
	}

	public String getName() {
		return pro.getProperty("name");
	}

	public String getProperty(String name) {
		return pro.getProperty(name);
	}

	public void setProperty(String name, String value) {
		pro.setProperty(name, value);
	}

	private String lable = "";

	public String getDataLable() {
		return this.lable;
	}

	public String[] getPropertyNames() {
		ArrayList array = new ArrayList();
		Enumeration keys = pro.keys();
		while (keys.hasMoreElements()) {
			array.add(keys.nextElement());
		}
		return (String[]) array.toArray((new String[array.size()]));
	}

	public void setDataLable(String lable) {
		this.lable = lable;
	}

}
